﻿using System;
using System.Web.UI;
using Coolite.Ext.Web;
using Pap.Web.Modules.Loan.ViewModel;
using Pap.Web.Utils;

namespace Pap.Web.Modules.Loan.Views
{
    /// <summary>
    /// 
    /// </summary>
    public partial class TodayExecutedLoansControl : BaseUserControl<TodayExecutedLoansControlViewModel>
    {
        /// <summary>
        /// Handles the Load event of the Page control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack && !Ext.IsAjaxRequest)
            {
                storeExecutedLoans.DataSource = this.ViewModel.GetTodaysExecutedLoans();
                storeExecutedLoans.DataBind();
            }
        }
    }
}